package com.neusoft.config;

import com.neusoft.baidu.util.BdOcrHelper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 配置百度ocr识别
 * @Author: zhengdc
 * @Date: 2019-12-03
 * @Version: V2.0
 */
@Configuration
public class ApiConfig {
    //配置orc的APPID/AK/SK
    @Value("${jeecg.baidu.appId}")
    private String appId;

    @Value("${jeecg.baidu.apiKey}")
    private String apiKey;

    @Value("${jeecg.baidu.secretKey}")
    private String secretKey;

    @Bean
    public void initApiConfig() {
        BdOcrHelper.setAppId(appId);
        BdOcrHelper.setApiKey(apiKey);
        BdOcrHelper.setSecretKey(secretKey);
    }
}
